/*
 * @Author: earl 
 * @Date: 2018-12-23 00:23:13 
 * @Last Modified by: earl
 * @Last Modified time: 2018-12-23 00:27:50
 * @Describe:  
 */

function m1(ctx){
  global.console.log('m1')
}

module.exports = function() {
  return async function(ctx, next) {
    global.console.log('m1 start')
    m1(ctx)
    await next() // 交给下一个中间件
    global.console.log('m1 end')
  }
}